package com.zyh.payment.service.impl;

import java.util.List;
import com.zyh.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zyh.payment.mapper.RentPaymentMapper;
import com.zyh.payment.domain.RentPayment;
import com.zyh.payment.service.IRentPaymentService;

/**
 * 支付管理Service业务层处理
 * 
 * @author zyh
 * @date 2025-06-16
 */
@Service
public class RentPaymentServiceImpl implements IRentPaymentService 
{
    @Autowired
    private RentPaymentMapper rentPaymentMapper;

    /**
     * 查询支付管理
     * 
     * @param id 支付管理主键
     * @return 支付管理
     */
    @Override
    public RentPayment selectRentPaymentById(Long id)
    {
        return rentPaymentMapper.selectRentPaymentById(id);
    }

    /**
     * 查询支付管理列表
     * 
     * @param rentPayment 支付管理
     * @return 支付管理
     */
    @Override
    public List<RentPayment> selectRentPaymentList(RentPayment rentPayment)
    {
        return rentPaymentMapper.selectRentPaymentList(rentPayment);
    }

    /**
     * 新增支付管理
     * 
     * @param rentPayment 支付管理
     * @return 结果
     */
    @Override
    public int insertRentPayment(RentPayment rentPayment)
    {
        rentPayment.setCreateTime(DateUtils.getNowDate());
        return rentPaymentMapper.insertRentPayment(rentPayment);
    }

    /**
     * 修改支付管理
     * 
     * @param rentPayment 支付管理
     * @return 结果
     */
    @Override
    public int updateRentPayment(RentPayment rentPayment)
    {
        return rentPaymentMapper.updateRentPayment(rentPayment);
    }

    /**
     * 批量删除支付管理
     * 
     * @param ids 需要删除的支付管理主键
     * @return 结果
     */
    @Override
    public int deleteRentPaymentByIds(Long[] ids)
    {
        return rentPaymentMapper.deleteRentPaymentByIds(ids);
    }

    /**
     * 删除支付管理信息
     * 
     * @param id 支付管理主键
     * @return 结果
     */
    @Override
    public int deleteRentPaymentById(Long id)
    {
        return rentPaymentMapper.deleteRentPaymentById(id);
    }
}
